package com.dsx.gyj.servlet;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

/**
 * author:xiaoxue1272
 * date:2020/5/17-17:15
 */
@WebServlet("/")
public class SelectServlet extends OurServlet {

    protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        doGet(request,response);
    }

    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        request.setCharacterEncoding("utf-8");
        request.setAttribute("list",super.cr.selectAll());
        request.getRequestDispatcher("list.jsp").forward(request,response);
    }
}
